package com.controller.after;




import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.controller.base.BaseController;
import com.entity.Users;
import com.service.ClassiFicationService;
import com.service.GoodpriceService;
import com.service.StudentService;

@Controller
public class InsexpageController extends BaseController<Object>{
	
	@Autowired
	private GoodpriceService goodService;
	@Autowired
	private StudentService stuService;
	@Autowired 
	private ClassiFicationService FicationService;
	
	//跳转主页
	@RequestMapping("/indexpage")
	public ModelAndView index()throws Exception{
		ModelAndView mv =  new ModelAndView();
		HttpSession session=getRequest().getSession();
		Users user= (Users)session.getAttribute("User");
		System.out.println("发送到页面的userSession："+user);
		mv.addObject("user", user);
		mv.setViewName("index");
		return mv;
	}
	
	
	@RequestMapping("/Showlogin")
	public ModelAndView Showlogin(){
		ModelAndView mv=new ModelAndView();
		mv.setViewName("pages/login");
		return mv;
	}
	
	//
	@RequestMapping("/testcontent")
	public ModelAndView testcontent()throws Exception{
		ModelAndView mv =  new ModelAndView();
		mv.setViewName("pages/StuContent");
		return mv;
	}
	
	//
	@RequestMapping("/usercontent")
	public ModelAndView usercontent()throws Exception{
		ModelAndView mv =  new ModelAndView();
		mv.setViewName("pages/Users/UserContent");
		return mv;  
	}
	
	
	//
	@RequestMapping("/Industrycontent")
	public ModelAndView Industrycontent()throws Exception{
		ModelAndView mv =  new ModelAndView();
		mv.setViewName("pages/Industry/IndustryContent");
		return mv;
	}
	//
	@RequestMapping("/Newscontent")
	public ModelAndView Newscontent()throws Exception{
		ModelAndView mv =  new ModelAndView();
		mv.setViewName("pages/News/NewsContent");
		return mv;
	}
	
	@RequestMapping("/NewsInforContent")
	public ModelAndView NewsInforContent()throws Exception{
		ModelAndView mv =  new ModelAndView();
		mv.setViewName("pages/NewsInfor/NewsInforContent");
		return mv;
	}
	//产品管理
	@RequestMapping("/ProductsContent")
	public ModelAndView ProductsContent()throws Exception{
		ModelAndView mv =  new ModelAndView();
		mv.setViewName("pages/Products/ProductsContent");
		return mv;
	}
}
